<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>mms-computing : Mixer for multiple Speaker and Microphone DataLines.</title>
<meta name="description" content="Java package that offers a virtual mixer that provides multiple speaker and microphone lines.">
<link rel=StyleSheet href="../../../../../css/general.css" type="text/css" title="mmsc-style" media="screen">
<link rel=StyleSheet href="../../../../../css/print.css" type="text/css" title="mmsc-style" media="print">
</head>
<body>
<div id="container">
<div id="header"><FONT COLOR="#0000ff">m</FONT><FONT COLOR="#ff0000">m</FONT>'<FONT COLOR="#7bc618">s</FONT> <FONT COLOR="#ffff00">c</FONT>omputing</div>
<div id="menu">
<ul>
<li><a href="../../../../../index.html">home</a></li>
<li><a href="../../../../../uk/co/mmscomputing/news/index.html">news</a></li>
<li><a href="../../../../../uk/co/mmscomputing/download/index.html">download</a></li>
<li><a href="../../../../../uk/co/mmscomputing/donation/index.html">donation</a></li>
<li><a href="../../../../../uk/co/mmscomputing/contact/index.html">contact</a></li>
</ul>
</div>
<div id="nav">&nbsp;
<div class="roundrect">
<div class="roundrect-top"><div></div></div>
<div class="roundrect-left"><div class="roundrect-right">
<div class="roundrect-gradient"><b>sub-directories</b></div>
<ul>
<li><a href="../index.html">up</a></li>
</ul>
</div></div>
<div class="roundrect-bottom"><div></div></div>
</div>
</div>
<div id="content">
<div id="abstract">
Java package that offers a virtual mixer that provides multiple speaker and microphone lines.
</div>
<div id="desc">
<p>
What happens:
<br><i>SpeakerThread</i> opens a line to the default output (usually the speaker) 
and offers up to <i>Mixer.MAXLINES</i> virtual lines that can write to the speaker. 
SpeakerThread only writes the data from the first active line to the <i>speaker</i>. 
It does not 'mix' the data.
<br><i>MicrophoneThread</i> opens a line to the default input (usually the microphone) 
and offers up to <i>Mixer.MAXLINES</i> virtual lines that can read from the <i>microphone</i>. 
MicrophoneThread writes the <i>microphone</i> data to all active lines. 

<br><em class="remark">(Why: First this simplifies a sound application like 
<a href="../../application/answerphone/">answerphone</a>
that might need more then one input/output line at a time.
<br>The second reason is the 
<i>javax.sound.sampled.LineUnavailableException: Failed to allocate clip data: Requested buffer too large.</i>
that I received when the SoundPlayer needed to play bigger messages.
Unfortunately this works only with a 1.5 jvm.
)</em>
</p>
<p>
To use/not use this Mixer, add/remove the line :
<br><i>uk.co.mmscomputing.sound.provider.MixerProvider</i>
<br>in the file :
<br><i>META-INF/services/javax.sound.sampled.spi.MixerProvider</i>
<br>
<br><em class="remark">The Mixer will only install data lines when called by a 1.5 jvm.</em>
</p></div>
<div id="files">
Package : uk.co.mmscomputing.sound.provider
<ol>
<li><a href="Clip.java">Clip.java</a></li>
<li><a href="DataLine.java">DataLine.java</a></li>
<li><a href="MicrophoneThread.java">MicrophoneThread.java</a></li>
<li><a href="Mixer.java">Mixer.java</a></li>
<li><a href="MixerProvider.java">MixerProvider.java</a></li>
<li><a href="SourceDataLine.java">SourceDataLine.java</a></li>
<li><a href="SpeakerThread.java">SpeakerThread.java</a></li>
<li><a href="TargetDataLine.java">TargetDataLine.java</a></li>
</ol>
</div>
<div id="dirlist">
</div>
<div id="projects">
</div>
</div>
<div id="fcontainer">
<div id="gnu">
All software on this site is free software; you can redistribute it and/or modify it under the terms of the <a href="http://www.gnu.org/copyleft/lesser.html" target="_blank"> GNU Lesser General Public License </a> as published by the Free Software Foundation
</div>
<div id="footer">
<br><FONT COLOR="#0000ff">m</FONT><FONT COLOR="#ff0000">m</FONT>'<FONT COLOR="#7bc618">s</FONT> <FONT COLOR="#ffff00">c</FONT>omputing<br>2010-03-04
</div>
</div>
</div>
</body>
</html>
